﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management/Management.master" AutoEventWireup="true"
    CodeFile="CompanyRecharge.aspx.cs" Inherits="Management_CompanyRecharge" %>

<%@ Import Namespace="Avatar.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table>
        <tr>
            <td style="vertical-align: top;">
                搜索公司：<asp:TextBox ID="txt_KeyWord" runat="server" Width="150px"></asp:TextBox>
                &nbsp;<asp:Button ID="btn_Search" runat="server" CssClass="Button" OnClick="btn_Search_Click"
                    Text="搜索" />
                <asp:GridView ID="gv_Company" runat="server" AutoGenerateColumns="False" CellPadding="4"
                    ForeColor="#333333" GridLines="None">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:TemplateField HeaderText="公司名称">
                            <ItemTemplate>
                                <%#Eval("CompanyName") %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="账户余额">
                            <ItemTemplate>
                                <%# GetBalance(Eval("user").ToString()) == null ? "0" : GetBalance(Eval("user").ToString()).Balance.ToString()%>
                                ￥
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <asp:Button ID="btn_Select" runat="server" Text="选择" CommandArgument='<%# Eval("User") %>'
                                    OnClick="btn_Select_Click" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </td>
            <td style="vertical-align: top;">
                <div class="Dialog" id="panel_Money" runat="server">
                    <div class="Title">
                        充值</div>
                    <div class="Content">
                        充值金额(元)：<asp:TextBox ID="txt_Money" runat="server"></asp:TextBox>
                        <br />
                        <asp:Button ID="btn_Recharge" runat="server" Text="充值" CssClass="Button" OnClick="btn_Recharge_Click" />
                    </div>
                </div>
                <asp:Label ID="lbl_Error" runat="server" ForeColor="Red" EnableViewState="false" />
            </td>
        </tr>
    </table>
</asp:Content>
